<%@ page language="java" import="java.util.*" pageEncoding="utf-8" %>
<%@include file="/commons/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<fmt:bundle basename="res">
<head>
    <meta charset="utf-8">
    <title><fmt:message key='ttbl' /></title>
    <jsp:include page="/WEB-INF/commons/commons-header.jsp" flush="true"/>
    <style>
        html {
            background: #fff;
        }
    </style>
</head>

<body>
<div class="layui-container">
    <div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

        <form:form commandName="groupBooking" class="layui-form" id="form">
            <form:hidden path="id"/>

            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend>基本信息</legend>
            </fieldset>


            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ptbh' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingNo}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='spmc' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.sku.goods.name}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ptjg' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.sku.groupBookingPrice}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='tznc' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.member.nickname}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='sjhm' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.member.mobile}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ktsj' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.createTime}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ctrs' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingCondition}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='cantrs' /></label>
                <div class="layui-form-mid layui-word-aux">
                        ${groupBooking.groupBookingTotal}
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='ptzt' /></label>
                <div class="layui-form-mid layui-word-aux">
                    <c:choose>
                        <c:when test="${groupBooking.status eq 1}"><fmt:message key='ptz' /></c:when>
                        <c:when test="${groupBooking.status eq 2}"><fmt:message key='ptcg' /></c:when>
                        <c:when test="${groupBooking.status eq 3}"><fmt:message key='ptsb' /></c:when>
                    </c:choose>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label"> <fmt:message key='sfct' /></label>
                <div class="layui-form-mid layui-word-aux">
                    <c:choose>
                        <c:when test="${groupBooking.groupBookingCondition == groupBooking.groupBookingTotal}"><fmt:message key='s' /></c:when>
                        <c:otherwise><fmt:message key='f' /></c:otherwise>
                    </c:choose>
                </div>
            </div>


            <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
                <legend><fmt:message key='ctxq' /></legend>
            </fieldset>

            <div class="layui-form-item attributeArea">
                <label class="layui-form-label"> <fmt:message key='spsku' /></label>
                <div class="layui-input-block">
                    <table class="layui-table" lay-size="sm" id="feijin-sku-table">
                        <tr>
                            <th><fmt:message key='bh' /></th>
                            <th><fmt:message key='cysf' /></th>
                            <th><fmt:message key='cync' /></th>
                            <th><fmt:message key='cysjh' /></th>
                            <th><fmt:message key='ctsj' /></th>
                        </tr>
                        </thead>
                        <tbody>
                        <c:forEach items="${groupBooking.details}" var="item">
                            <tr>
                                <td>${item.orderNo}</td>
                                <td>
                                    <c:choose>
                                        <c:when test="${item.type eq 1}"><fmt:message key='tz' /></c:when>
                                        <c:otherwise><fmt:message key='ct' /></c:otherwise>
                                    </c:choose>
                                </td>
                                <td>${item.member.nickname}</td>
                                <td>${item.member.mobile}</td>
                                <td>${item.createTime}</td>
                            </tr>
                        </c:forEach>
                        </tbody>
                    </table>
                </div>
            </div>

        </form:form>
    </div>
</div>

<script>

    $(function () {

        layui.use(['form', 'laydate'], function () {

            var form = layui.form;
            var laydate = layui.laydate;

        });
    });
</script>
</body>
</fmt:bundle>
</html>